<?php include('./templete/public/head.php') ?>
<body>
<!--金点子排行-->
<div class="idea-rank-main">
    <img src="_images/rank-bg.jpg" class="rank-bg"/>
    <div class="rank-content">
        <div class="c-bot">
            <div class="mui-slider">
                <div class="mui-control">
                    <div class="mui-slider-group">
                        <!--1-->
                        <div class="mui-slider-item mui-control-content">
                             <ul class="rank-list">
                                <?php foreach ($list as $k => $v) { ?>
                                    <?php if ($v['user_id']) { ?>
                                        <?php $user_info[$k] = get_user_info($v['user_id']) ?>
                                        <li class="rank-item">
                                            <img src="<?php echo $user_info[$k]['avatar'] ?>"
                                                 class="head-img"/>
                                            <div class="progress" id="progress<?php echo $k ?>">
                                                <p><?php echo $user_info[$k]['name'] ?>
                                                    <span class="integral"><?php echo $v['integral'] ?></span><span>分</span>
                                                </p>
                                                <p class="mui-progressbar mui-progressbar-in">
                                                    <span></span>
                                                </p>
                                            </div>
                                        </li>
                                    <?php } ?>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
<script>
    //进度
    (function () {
        var progressbar1 = $("[id^='progress']");// mui('#progress^');
        var first = $('#progress0').find('.integral').text();
        for (var i = 0; i < progressbar1.length; i++) {
            let integral = $('#progress' + i).find('.integral').text();

            mui(progressbar1[i]).progressbar().setProgress(integral * 100 / first)
        }
    })(mui);


    var topheight=$(".rank-list").offset().top;
    var height= $(window).height() - topheight-30;
    $(".mui-slider-group").css("height",height)
</script>
</html>